package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Name     string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(50)"`
}

type Video struct {
	gorm.Model
	Title     string `gorm:"type:varchar(50)"`
	Content   string `gorm:"type:varchar(125)"`
	Img       string `gorm:"type:varchar(225)"`
	UserID    int    `gorm:"type:int"`
	User      User   `gorm:"foreignKey:UserID"`
	LikeCount int    `gorm:"type:int"`
}

type Like struct {
	gorm.Model
	UserID  int   `gorm:"type:int"`
	User    User  `gorm:"foreignKey:UserID"`
	VideoID int   `gorm:"type:int"`
	Video   Video `gorm:"foreignKey:VideoID"`
}
